public class test_return {
    public static void main(String[] args) {
        chu(10, 5);
        chu(10, 0);
    }

    public static void chu(int dividend, int divisor) {
        System.out.println("开始");
        if (divisor == 0) {
            System.out.println("您的数据有误!!不执行!!");
            System.out.println("结束");
            return; // 使用return跳出方法
        }

        int result = dividend / divisor;
        System.out.println("除法结果是:" + result);
        System.out.println("结束");
    }
}
